package com.bolt.admin.module.log.dto;

import com.bolt.admin.module.log.entity.LogEntity;
import com.bolt.support.query.conditions.domain.MatchType;
import com.bolt.support.spring.jpa.annotation.Filter;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;

@Data
public class LogDTO {
    /**
     * * ID
     **/
    private String id;


    /**
     * * 模块名
     **/
    @ApiModelProperty(notes = "模块名")
    @Filter(type= MatchType.BW)
    private String module;


    /**
     * * 方法名
     **/
    @ApiModelProperty(notes = "方法名")
    private String method;


    /**
     * * 方法参数
     **/
    @ApiModelProperty(notes = "方法参数")
    private String params;


    /**
     * * 方法说明
     **/
    @ApiModelProperty(notes = "方法说明")
    private String description;


    /**
     * * 请求ip
     **/
    @ApiModelProperty(notes = "请求ip")
    @Filter(type= MatchType.BW)
    private String requestIp;


    /**
     * * 请求耗时
     **/
    @ApiModelProperty(notes = "请求耗时")
    private Long time;


    /**
     * * 用户ID
     **/
    @ApiModelProperty(notes = "用户ID")
    @Filter(type= MatchType.EQ,owned = LogEntity.class)
    private String userId;

    /**
     * * 用户名
     **/
    @ApiModelProperty(notes = "用户名")
    private String userName;


    /**
     * * 地址
     **/
    @ApiModelProperty(notes = "地址")
    private String address;


    /**
     * * 浏览器
     **/
    @ApiModelProperty(notes = "浏览器")
    private String browser;


    /**
     * * 异常详细
     **/
    @ApiModelProperty(notes = "异常详细")
    private String exceptionDetail;


    /**
     * * 创建日期
     **/
    @ApiModelProperty(notes = "创建日期")
    @JsonFormat(pattern = "yyyy-MM-dd hh:ss:mm", timezone = "GMT+8")
    @Filter(type= MatchType.BT,owned = LogEntity.class)
    private Date createTime;

    /**
     * 是否成功
     */
    @ApiModelProperty(notes = "是否成功")
    @Filter(type= MatchType.EQ,owned = LogEntity.class)
    private Boolean success;
}